picture: Set alternative text as description
authorMatthias Clasen <mclasen@redhat.com>
Thu, 22 Oct 2020 04:04:52 +0000 (00:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 22 Oct 2020 11:51:44 +0000 (07:51 -0400)
Use the alternative text as accessible description
for GtkPicture.

gtk/gtkpicture.c

index fc030fd80d913f993929f8ea925a4c41411f1caa..78e5ba449a4c3e3df8dfc26a381b664ffe1e8ce4 100644 (file)
@@ -969,6 +969,11 @@ gtk_picture_set_alternative_text (GtkPicture *self,
 
   g_free (self->alternative_text);
   self->alternative_text = g_strdup (alternative_text);
+
+  gtk_accessible_update_property (GTK_ACCESSIBLE (self),
+                                  GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, alternative_text,
+                                  -1);
+
   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ALTERNATIVE_TEXT]);
 }